package com.darly.std.obs;


import android.app.Activity;

import com.darly.dlcommon.common.dlog.DLog;
import com.darly.rnmodule.component.store.OnStoreDialogListener;
import com.darly.rnmodule.obs.ObserverListener;
import com.darly.rnmodule.obs.AbstractDesigner;
import com.darly.std.business.store.StoreDialogView;

import java.util.Enumeration;

/**
 * 调用方法类。
 *
 * @author Darly/张宇辉/2017/11/23 14:18
 * @version 1.0/com.darly.common
 */
public class AppDesigner extends AbstractDesigner {

    public AppDesigner() {
    }

    @Override
    public void notifUI() {
        Enumeration enumd = this.vector.elements();
        while (enumd.hasMoreElements()) {
            ObserverListener observerListener = (ObserverListener) enumd.nextElement();
            observerListener.notifUI();
        }
    }

    @Override
    public void openStoreDialog(Activity activity, OnStoreDialogListener listener) {
        DLog.d("[APP openStoreDialog]");
        StoreDialogView.getInstance().showDialog(activity, listener);
    }

    @Override
    public void dismissStoreDialog(String isFinish,String msg) {
        DLog.d("[APP dismissStoreDialog]");
        StoreDialogView.getInstance().dismissDialog(isFinish,msg);
    }
}